//
//  SDAboutViewController.m
//  SKinDiary
//
//  Created by pcyang on 16/8/20.
//  Copyright © 2016年 tencent. All rights reserved.
//

#import "SDAboutViewController.h"

@interface SDAboutViewController ()

@end

@implementation SDAboutViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self initViews];
}

- (void)initViews
{
    BOOL naviHidden = [self navigationBarHidden];
    if (!naviHidden && self.navBar != nil)
    {
        [self.navBar setTitle:@"关于"];
        UIImage* addImg = LOAD_IMAGE_USE_CACHE_INBUNDLE(DefaultBundle, @"actionbar_btn_back.png");
        [self.navBar customNaviLeftButton:self action:@selector(onBack:) image:addImg];
    }
    
    _photoView = [[UIImageView alloc] initWithFrame:autoRectTableViewHaveBar(!naviHidden)];
    _photoView.contentMode = UIViewContentModeScaleAspectFit;
    [_photoView setUserInteractionEnabled:YES];
    [self.view addSubview:_photoView];
    
    _photoView.image = LOAD_IMAGE_USE_CACHE_INBUNDLE(SettingsPageBundle, @"landingpage.png");
}

- (BOOL)navigationBarHidden
{
    return NO;
}

- (void)onBack:(id)sender
{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
